package com.youmeek.ssm.module.category.mapper;

import com.youmeek.ssm.module.category.model.TaxCategory;
import com.youmeek.ssm.module.category.model.TaxCode;
import com.youmeek.ssm.module.category.vo.TaxCategoryVO;
import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface ITaxCategoryMapper {

    int deleteByPrimaryKey(String categoryId);

    int insert(TaxCategory record);

    int insertSelective(TaxCategory record);

    TaxCategory selectByPrimaryKey(String categoryId);

    int updateByPrimaryKeySelective(TaxCategory record);

    int updateByPrimaryKey(TaxCategory record);

    TaxCategoryVO selectByMergeCoding(@Param("mergeCoding") String mergeCoding);

    List<TaxCategory> selectByIds(List<String> ids);

    TaxCategory selectTaxCategoryByMergeCoding(String mergeCoding);

    @MapKey("mergeCoding")
    Map<String, TaxCategory> selectAllTaxCategory();

    List<TaxCode> selectAllTaxCode();

    void tableRebuild();

    List<String> selectAllIds();

    List<TaxCode> selectChildsByMergeCode(String mergeCoding);

    TaxCategory selectByCode(String coding);

    /**
     * @title: selectByCopyId
     * @description: 导入商品表数据所用
     * @param id
     * @return
     */
    TaxCategory selectByCopyId(String id);
}
